package caiziyou.com.designpattern.adapter.objectdapter;

public class Phone {

	public void charging(IVoltage5V  iVoltage5V) {
		int output5v = iVoltage5V.output5V();
		if(output5v == 5) {
			System.out.println("电压为5V，可以充电");
		}else if(output5v > 5) {
			System.out.println("电压大于5V，不可以充电");
		}
	}
}
